﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;
namespace VBFOOL.MediaPlayer.Core.Interface
{
    public interface ISubtitleReader
    {
        string SubtitleType { get; }
        string SubtilteHeader { get; }
        string Name { get; }
        event EventHandler<SubtitleChangedEventArgs> ItemsChanged;
        IEnumerable<SubtitleItem> Items { get; }

    }
    public class SubtitleItem
    {
        public ISubtitleReader Parent { get; set; }
        public TimeSpan TimeCode { get; set; }
        public TimeSpan Duration { get; set; }
        public IDictionary<string,object> Properties { get; set; }
        public string Text { get; set; }
    }
    public class SubtitleChangedEventArgs : EventArgs
    {
        public IList<SubtitleItem> AddItems { get; private set; }
        public IList<SubtitleItem> RemoveItems { get;private set; }
        public SubtitleChangedEventArgs(IList<SubtitleItem> AddItems, IList<SubtitleItem> RemoveItems)
        {
            this.AddItems = AddItems;
            this.RemoveItems = RemoveItems;
        }

    }

}
